﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Reflection;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;

namespace DevPhoneToolkitSample.Samples
{
    public partial class CalendarControlMvvMSample : PhoneApplicationPage
    {
        public CalendarControlMvvMSample()
        {
            InitializeComponent();
            DataContext = this;
        }
        public string SourceHtml
        {
            get
            {
                string result = null;
                using (var resourceStream =
                        Assembly.GetExecutingAssembly().GetManifestResourceStream("DevPhoneToolkitSample.Data.HtmlMvvmCalendar.html"))
                {
                    //Verify if the resource is valid
                    if (resourceStream != null)
                    {
                        //Prepare the stream to read
                        using (var resourceReader = new StreamReader(resourceStream))
                        {
                            // Read the stream and get the html
                            result = resourceReader.ReadToEnd();
                        }
                    }
                }
                return result;
            }
        }

    }
}